package demo3;

public class StackMain {
    public static void main(String[] args){
        Stackself stack1=new Stackself();
        stack1.push(1);
        stack1.push(5);
        stack1.push(3);
        stack1.push(2);
        stack1.push(7);
        int a=stack1.pop();
        System.out.println("出栈："+a);
        int b=stack1.peek();
        System.out.println("获取的栈顶元素为："+b);
        stack1.display(stack1);

    }
}
